﻿using System;
using System.IO;
using System.Text;

namespace Truncation.Detector.Win32
{
    internal class PositionReader : StreamReader
    {
        private int _lineNumber;
        public PositionReader(Stream stream, Encoding encoding)
            : base(stream, encoding)
        {
        }

        public override String ReadLine()
        {
            var ret = base.ReadLine();
            if (ret != null)
                _lineNumber ++;
            return ret;
        }

        public int LineNumber { get { return _lineNumber; } }
    }
}
